<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线分析 - 转炉终点预测系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <link rel="stylesheet" href="styles/unified.css">
    <link rel="stylesheet" href="styles/components.css">
    <link rel="stylesheet" href="styles/sidebar-theme.css">
    <link rel="stylesheet" href="styles/scale-fix.css">
    <link rel="stylesheet" href="styles/modal-dialog.css">
</head>
<body>
    <!-- 侧边栏 -->
    <div class="sidebar">
        <div class="sidebar-header">
            <div class="sidebar-logo">
                <i class="fas fa-industry"></i>
            </div>
            <div class="sidebar-title">转炉终点预测系统</div>
        </div>
        <div class="sidebar-menu">
            <div class="sidebar-menu-title">主导航</div>
            <ul>
                <li><a href="index.html"><i class="fas fa-home"></i>首页</a></li>
                
                <li><a href="production-monitor.html"><i class="fas fa-chart-line"></i>生产监控</a></li>
                <li><a href="history-data.html"><i class="fas fa-history"></i>历史数据</a></li>
                <li><a href="quality-analysis.html"><i class="fas fa-flask"></i>质量分析</a></li>
            </ul>
            
            <div class="sidebar-menu-title">模型管理</div>
            <ul>
                <li><a href="model-details.html"><i class="fas fa-brain"></i>模型详情</a></li>
                <li><a href="model-config.html"><i class="fas fa-cogs"></i>模型配置</a></li>
                <li><a href="model-performance.html"><i class="fas fa-chart-bar"></i>模型性能</a></li>
                <li><a href="model-update.html"><i class="fas fa-sync-alt"></i>模型更新</a></li>
            </ul>
            
            <div class="sidebar-menu-title">系统设置</div>
            <ul>
                <li><a href="system-settings.html"><i class="fas fa-cog"></i>系统设置</a></li>
                <li><a href="online-analysis.html" class="active"><i class="fas fa-chart-bar"></i>在线分析</a></li>
            </ul>
        </div>
        <div class="sidebar-footer">
            <i class="fas fa-info-circle"></i>
            <span>系统版本：v2.5.3</span>
        </div>
    </div>

    <!-- 侧边栏遮罩层 -->
    <div class="sidebar-overlay"></div>

    <div class="container">
        <div class="header">
            <div class="header-left">
                <div>
                    <div class="title">在线分析</div>
                    <div class="subtitle">实时数据采集与分析</div>
                </div>
            </div>
            <div class="header-right">
                <div class="header-icon">
                    <i class="fas fa-search"></i>
                </div>
                <div class="header-icon">
                    <i class="fas fa-bell"></i>
                    <span class="notification-badge">3</span>
                </div>
                <div class="dropdown">
                    <div class="user-dropdown dropdown-trigger">
                        <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="用户头像" class="user-avatar">
                        <span class="user-name">工程师</span>
                        <i class="fas fa-chevron-down"></i>
                    </div>
                    <div class="dropdown-menu">
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-user"></i>
                            <span>个人资料</span>
                        </a>
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-cog"></i>
                            <span>账号设置</span>
                        </a>
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-question-circle"></i>
                            <span>帮助中心</span>
                        </a>
                        <a href="#" class="dropdown-item">
                            <i class="fas fa-sign-out-alt"></i>
                            <span>退出登录</span>
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <div class="content-wrapper">
            <!-- 实时数据流面板 -->
            <div class="card">
                <div class="card-header">
                    <div class="card-title">
                        <i class="fas fa-stream"></i>
                        实时数据流
                    </div>
                    <div class="header-actions">
                        <button class="btn btn-sm btn-secondary">
                            <i class="fas fa-sync-alt"></i>
                            刷新
                        </button>
                        <div class="dropdown">
                            <button class="btn btn-sm btn-secondary dropdown-trigger">
                                <i class="fas fa-ellipsis-v"></i>
                            </button>
                            <div class="dropdown-menu">
                                <a href="#" class="dropdown-item">导出数据</a>
                                <a href="#" class="dropdown-item">设置采样率</a>
                                <a href="#" class="dropdown-item">筛选参数</a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="card-content">
                    <div class="table-responsive">
                        <table>
                            <thead>
                                <tr>
                                    <th>参数名称</th>
                                    <th>当前值</th>
                                    <th>趋势</th>
                                    <th>状态</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>温度 (°C)</td>
                                    <td>1632.5</td>
                                    <td>
                                        <span class="trend-up">
                                            <i class="fas fa-arrow-up"></i> +2.3
                                        </span>
                                    </td>
                                    <td><span class="status-badge active">正常</span></td>
                                </tr>
                                <tr>
                                    <td>氧含量 (%)</td>
                                    <td>0.023</td>
                                    <td>
                                        <span class="trend-down">
                                            <i class="fas fa-arrow-down"></i> -0.005
                                        </span>
                                    </td>
                                    <td><span class="status-badge active">正常</span></td>
                                </tr>
                                <tr>
                                    <td>碳含量 (%)</td>
                                    <td>0.051</td>
                                    <td>
                                        <span class="trend-down">
                                            <i class="fas fa-arrow-down"></i> -0.003
                                        </span>
                                    </td>
                                    <td><span class="status-badge warning">偏高</span></td>
                                </tr>
                                <tr>
                                    <td>压力 (MPa)</td>
                                    <td>0.238</td>
                                    <td>
                                        <span class="trend-up">
                                            <i class="fas fa-arrow-up"></i> +0.012
                                        </span>
                                    </td>
                                    <td><span class="status-badge active">正常</span></td>
                                </tr>
                                <tr>
                                    <td>氮含量 (%)</td>
                                    <td>0.007</td>
                                    <td>
                                        <span class="trend-steady">
                                            <i class="fas fa-minus"></i> 0.000
                                        </span>
                                    </td>
                                    <td><span class="status-badge active">正常</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <!-- 分析图表区域 -->
            <div class="analysis-charts">
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-chart-line"></i>
                            参数趋势分析
                        </div>
                        <div class="header-actions">
                            <div class="param-selector">
                                <label>查看参数:</label>
                                <select class="form-control">
                                    <option value="temp">温度</option>
                                    <option value="oxygen">氧含量</option>
                                    <option value="carbon">碳含量</option>
                                    <option value="pressure">压力</option>
                                    <option value="nitrogen">氮含量</option>
                                </select>
                            </div>
                            <div class="time-selector">
                                <button class="btn btn-sm btn-primary">5分钟</button>
                                <button class="btn btn-sm btn-secondary">15分钟</button>
                                <button class="btn btn-sm btn-secondary">30分钟</button>
                                <button class="btn btn-sm btn-secondary">1小时</button>
                            </div>
                        </div>
                    </div>
                    <div class="card-content">
                        <div class="chart-container">
                            <div class="chart-placeholder">
                                <i class="fas fa-chart-line"></i>
                                <p>温度趋势图将在这里显示</p>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-calculator"></i>
                            实时预测分析
                        </div>
                        <div class="header-actions">
                            <button class="btn btn-sm btn-primary">
                                <i class="fas fa-play"></i>
                                实时预测
                            </button>
                            <div class="accuracy-display">
                                <span>准确率:</span>
                                <span class="accuracy-value">94.7%</span>
                            </div>
                        </div>
                    </div>
                    <div class="card-content">
                        <div class="prediction-results">
                            <div class="prediction-item">
                                <div class="prediction-info">
                                    <div class="prediction-label">预测终点温度:</div>
                                    <div class="prediction-value">1645.8 °C</div>
                                </div>
                                <div class="confidence">
                                    <div class="confidence-bar" style="width: 92%"></div>
                                    <span>92% 置信度</span>
                                </div>
                            </div>
                            <div class="prediction-item">
                                <div class="prediction-info">
                                    <div class="prediction-label">预测终点碳含量:</div>
                                    <div class="prediction-value">0.047 %</div>
                                </div>
                                <div class="confidence">
                                    <div class="confidence-bar medium" style="width: 85%"></div>
                                    <span>85% 置信度</span>
                                </div>
                            </div>
                            <div class="prediction-item">
                                <div class="prediction-info">
                                    <div class="prediction-label">预计剩余时间:</div>
                                    <div class="prediction-value">6 分 23 秒</div>
                                </div>
                                <div class="confidence">
                                    <div class="confidence-bar" style="width: 94%"></div>
                                    <span>94% 置信度</span>
                                </div>
                            </div>
                            <div class="prediction-item">
                                <div class="prediction-info">
                                    <div class="prediction-label">建议氧气流量:</div>
                                    <div class="prediction-value">380 m³/h</div>
                                </div>
                                <div class="confidence">
                                    <div class="confidence-bar medium" style="width: 78%"></div>
                                    <span>78% 置信度</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- JavaScript引用 -->
    <script src="scripts/unified.js"></script>
    <script src="scripts/modal-dialog.js"></script>

    <style>
        /* 在线分析页面特有样式 */
        .analysis-charts {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        
        .chart-container {
            height: 300px;
            position: relative;
        }
        
        .chart-placeholder {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background-color: rgba(0, 0, 0, 0.02);
            border-radius: var(--radius);
        }
        
        .chart-placeholder i {
            font-size: 48px;
            color: var(--gray);
            margin-bottom: 15px;
        }
        
        .chart-placeholder p {
            color: var(--gray);
        }
        
        .param-selector {
            display: flex;
            align-items: center;
            margin-right: 15px;
        }
        
        .param-selector label {
            margin-right: 10px;
            color: var(--gray);
        }
        
        .time-selector {
            display: flex;
            gap: 5px;
        }
        
        .accuracy-display {
            display: flex;
            align-items: center;
            margin-left: 15px;
            color: var(--gray);
        }
        
        .accuracy-value {
            font-weight: 600;
            color: var(--success-color);
            margin-left: 5px;
        }
        
        .prediction-results {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .prediction-item {
            background-color: rgba(0, 0, 0, 0.02);
            border-radius: var(--radius);
            padding: 15px;
        }
        
        .prediction-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        
        .prediction-label {
            font-weight: 500;
            color: var(--gray-dark);
        }
        
        .prediction-value {
            font-weight: 600;
            color: var(--primary-dark);
        }
        
        .confidence {
            position: relative;
            height: 8px;
            background-color: rgba(0, 0, 0, 0.05);
            border-radius: 4px;
            margin-top: 5px;
        }
        
        .confidence-bar {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            background-color: var(--success-color);
            border-radius: 4px;
        }
        
        .confidence-bar.medium {
            background-color: var(--warning-color);
        }
        
        .confidence span {
            position: absolute;
            top: -25px;
            right: 0;
            font-size: 12px;
            color: var(--gray);
        }
        
        .trend-up {
            color: var(--success-color);
        }
        
        .trend-down {
            color: var(--danger-color);
        }
        
        .trend-steady {
            color: var(--gray);
        }
        
        .header-actions {
            display: flex;
            align-items: center;
        }
        
        @media (max-width: 768px) {
            .analysis-charts {
                grid-template-columns: 1fr;
            }
            
            .header-actions {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            
            .param-selector {
                margin-right: 0;
                margin-bottom: 10px;
            }
            
            .accuracy-display {
                margin-left: 0;
                margin-top: 10px;
            }
        }
    </style>
</body>
</html> 